import { request } from '@/utils/request'
export const createPost = (content: string, imageUrls?: string[]) => {
  return request('/postDynamic', 'post', {
    content,
    imageUrls
  })
}
export const getPost = () => {
  return request('/getDynamic')
}
export const likePost = (postId: number) => {
  return request('/likePost', 'post', {
    postId
  })
}
export const deletePostData = (postId: number) => {
  return request('/deletePost', 'delete', {
    postId
  })
}
export const sharePostData = (postId: number) => {
  return request('/sharePost', 'post', {
    postId
  })
}
export const getPostDetail = (postId: number) => {
  return request(`/getPostDetail?postId=${postId}`)
}
export const getPostLikeMemberData = (postId: number) => {
  return request(`/getPostLikes?postId=${postId}`)
}
export const createPostMoment = (postId: number, content: string) => {
  return request(`/addComment`, 'post', {
    postId,
    content
  })
}
export const getPostMomentData = (postId: number) => {
  return request(`/getComments?postId=${postId}`)
}
